Skip to content

Fix EU event-log fallback to query EU host#16

Merged
winrid merged 1 commit into
mainfrom
fix-eu-event-log-host
Jul 10, 2026
Merged

Fix EU event-log fallback to query EU host#16
winrid merged 1 commit into
mainfrom
fix-eu-event-log-host

Conversation

@winrid

@winrid winrid commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Problem

subscribeToChanges correctly routes the live WebSocket to wss://ws-eu.fastcomments.com for EU tenants (config.region == "eu"), but the "fetch missed events" REST fallback (fetchEventLog) always built its PublicApi against the default host https://fastcomments.com:

PublicApi publicApi = new PublicApi(new ApiClient(httpClient)); // default host, no region switch

For EU tenants this silently queries US infra and gets nothing back, so any events missed while disconnected (the whole point of the fallback) are never replayed.

Fix

Thread config.region into fetchEventLog and point the ApiClient at https://eu.fastcomments.com when the region is "eu" (the EU host already exists in the generated client's server list).

Testing

:pubsub:compileJava builds cleanly against the local client via the CI init script:

./core/gradlew :pubsub:compileJava --init-script ci-local-client.gradle --no-daemon
BUILD SUCCESSFUL

Notes

The same bug was found and fixed in the Python SDK; this brings the Java SDK in line for EU tenants.

subscribeToChanges correctly routes the WebSocket to wss://ws-eu.fastcomments.com
for EU tenants, but the "fetch missed events" REST fallback always built its
PublicApi against the default host (https://fastcomments.com). For EU tenants
that silently queried US infra and returned nothing, so events missed while
disconnected were never replayed.

Thread config.region into fetchEventLog and point the ApiClient at
https://eu.fastcomments.com when region is "eu".
@winrid
winrid merged commit c51f120 into main Jul 10, 2026
1 check passed
@winrid
winrid deleted the fix-eu-event-log-host branch July 10, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant